﻿Imports SISSAT.BusinessLayer.Services

Namespace Views
    Public Class EmployeePresenter

        Private Property View As IEmployeeView
        Private Property Service As IEmployeeService

        Public Sub New(view As IEmployeeView)
            Service = New EmployeeService
            Me.View = view
            AddHandler Me.View.OnInitialization, AddressOf OnInitialization
        End Sub

        Private Sub OnInitialization()
            Me.View.RepeaterDataSource = From entity In Service.ReadAll()
                                         Where entity.EmployeeType.EmployeeTypeId = 3
                                         Select entity
        End Sub

    End Class
End Namespace

